<table id="user-table"></table>

<script type="text/html" id="user-table-toolbar">
    <button class="layui-btn layui-btn-sm layui-btn-primary layui-border-green" lay-event="add" perm='add-user'>
        <i class="layui-icon-add-circle layui-icon"></i>&nbsp;用户
    </button>

    <input type="text" name="search" autocomplete="off" placeholder="输入账号、姓名、手机、邮箱等模糊搜索……"
           lay-affix="clear" class="layui-input" style="width:340px;"/>

    <button class="layui-btn layui-btn-sm" lay-event="search">
        <i class="layui-icon-search layui-icon"></i>&nbsp;搜索
    </button>
    <button class="layui-btn layui-btn-sm layui-btn-primary layui-border-green" lay-event="reset"
            style="margin-left: 0;">
        <i class="layui-icon-refresh layui-icon"></i>&nbsp;重置
    </button>
</script>

<script type="text/html" id="user-table-tools">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="md" perm="modify-user">
            编辑
        </button>
        <button class="layui-btn layui-btn-primary layui-border-red layui-btn-xs" lay-event="rm" perm="remove-user">
            删除
        </button>
        <button class="layui-btn layui-btn-primary layui-border-green layui-btn-xs" lay-event="grant"
                perm="grant-user-role">授权
        </button>
    </div>
</script>